const webpack = require('webpack');

const devConfig = {
    mode: 'development',
    devtool: "cheap-module-eval-source-map",
    entry: {
        main: './src/index.js'
    },
    devServer: {
        contentBase: './dist',
        open: true,
        port: 8080,
        hot: true
    },
    module: {
        rules: [{
            test: /\.css$/,
            use: [
                "style-loader",
                'css-loader'

            ]
        }]
    },
    output: {
        filename: '[name].js',
        chunkFilename:'[name].chunk.js',
    },
    plugins: [
        new webpack.HotModuleReplacementPlugin()
    ]
}

module.exports = devConfig